package com.yuxi.Dao.Impl;

import java.io.Serializable;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.yuxi.Dao.RoleDao;
import com.yuxi.Entity.Information;
import com.yuxi.Entity.Role;

@Repository
public class RoleDaoImpl extends BaseDaoImpl<Serializable, Serializable> implements RoleDao {
	private Logger logger = LoggerFactory.getLogger(RoleDaoImpl.class);
	public RoleDaoImpl() {
		super(Role.class);
	}
	
	
	@Override
	public Role getRole(Integer id) {
		// TODO Auto-generated method stub
		return (Role) super.get(id);
	}

	@Override
	public Role addRole(Role role) {
		// TODO Auto-generated method stub
		return (Role) super.addAndReturn(role);
	}

	@Override
	public void deleteRole(Role role) {
		// TODO Auto-generated method stub
		super.delete(role);
	}

	@Override
	public void modifly(Role role) {
		// TODO Auto-generated method stub
		super.update(role);
	}

	@Override
	public List<Role> getAllRole() {
		// TODO Auto-generated method stub
		return super.find("from Role");
	}

}
